This repository has no description
0

Configure Feed

Select the types of activity you want to include in your feed.

semble / src / webapp / app / (dashboard) / profile / [handle] / (withoutHeader) / collections / [rkey] / opengraph-image.tsx
1.7 kB 67 lines
1import { getCollectionPageByAtUri } from '@/features/collections/lib/dal'; 2import OpenGraphCard from '@/features/openGraph/components/openGraphCard/OpenGraphCard'; 3import { truncateText } from '@/lib/utils/text'; 4 5interface Props { 6 params: Promise<{ rkey: string; handle: string }>; 7} 8 9export const contentType = 'image/png'; 10export const size = { 11 width: 1200, 12 height: 630, 13}; 14 15export default async function Image(props: Props) { 16 const { rkey, handle } = await props.params; 17 18 const collection = await getCollectionPageByAtUri({ 19 recordKey: rkey, 20 handle: handle, 21 }); 22 23 return await OpenGraphCard({ 24 children: ( 25 <div style={{ display: 'flex', flexDirection: 'column' }}> 26 <div 27 style={{ 28 display: 'flex', 29 flexDirection: 'column', 30 gap: 10, 31 marginTop: '35px', 32 }} 33 > 34 <p 35 style={{ 36 fontSize: '40px', 37 lineHeight: '20px', 38 color: '#e803ff', 39 }} 40 > 41 Collection 42 </p> 43 <p 44 style={{ 45 fontSize: '64px', 46 lineHeight: '20px', 47 }} 48 > 49 {truncateText(truncateText(collection.name), 35)} 50 </p> 51 <p 52 style={{ 53 fontSize: '40px', 54 lineHeight: '20px', 55 marginTop: '40px', 56 }} 57 > 58 <span>By&nbsp;</span> 59 <span style={{ color: '#23AFED' }}> 60 @{truncateText(truncateText(collection.author.handle), 35)} 61 </span> 62 </p> 63 </div> 64 </div> 65 ), 66 }); 67}